#冒泡排序
b=[22,14,2,3,5,15,21]
i=0
len=len(b)
temp=None
while i<len-1:
    j=0
    while j<len-i-1:
        if b[j]>b[j+1]:
            #调换位置
            temp=b[j]
            b[j]=b[j+1]
            b[j+1]=temp
        j+=1
    i+=1
print("排序后：")
for x in b:
    print(x,end="\t")